package com.app.micaihu.ad;

import java.util.LinkedList;

/**
 * Created by Guo
 * On 2017/9/20
 *
 * 广告请求的request 基类
 */

public abstract class AdNativeRequest<T> {

    protected int retryNum;
    protected String adPosId;
    protected LinkedList<T> nrAdList;
    protected Integer hashCode;

    public AdNativeRequest(int retryNum, String adPosId, LinkedList<T> nrAdList){
        this.adPosId = adPosId;
        this.nrAdList = nrAdList;
        this.hashCode = this.hashCode();
        this.retryNum = retryNum;
    }


    /**
     * 请求广告
     */
    public void adRequest(){
        retryNum++;
        reqeustAd();
    }

    protected abstract void reqeustAd();

    public int getRetryNum(){
        return retryNum;
    }
}
